cap program drop pvalue
program define pvalue
	
	syntax , [NUM(integer 10)]
		
	global p`num': di %04.3f `= 2 * (1 - normal(((abs(e(b)[1,1] - e(b)[1,2]))) / sqrt(e(V)[1,1] + e(V)[2,2] - 2 * e(V)[2,1])))'
 
	if ${p`num'} < 0.01 		global diff_stars`num' "\sym{***}" 	    
	else if ${p`num'} < 0.05 	global diff_stars`num' "\sym{**}"
	else if ${p`num'} < 0.10 	global diff_stars`num' "\sym{*}"
	else 					    global diff_stars`num' ""
	
end